package io.lkt.modules.sys.service.impl;

import io.lkt.commons.dynamic.datasource.annotation.DataSource;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.lkt.common.utils.PageUtils;
import io.lkt.common.utils.Query;

import io.lkt.modules.sys.dao.BPosterInfoDao;
import io.lkt.modules.sys.entity.BPosterInfoEntity;
import io.lkt.modules.sys.service.BPosterInfoService;


@Service("bPosterInfoService")
public class BPosterInfoServiceImpl extends ServiceImpl<BPosterInfoDao, BPosterInfoEntity> implements BPosterInfoService {

    @Override
    @DataSource("master")
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BPosterInfoEntity> page = this.page(
                new Query<BPosterInfoEntity>().getPage(params),
                new QueryWrapper<BPosterInfoEntity>()
                        .orderByDesc("id")
        );

        return new PageUtils(page);
    }

}
